package com.xiaofan.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

/**
 * @version 1.0
 * @author: 晓帆
 **/
@Controller
@RequestMapping("hello")
public class HelloController {
    @RequestMapping("demo1")
    public void hello(){
        System.out.println("hello");
    }
    @RequestMapping("login")
    public String login(String username, HttpSession session){
        session.setAttribute("username",username);
        return "success";
    }

    @RequestMapping("hello1")
    public String hello1(){
        return "hello";
    }

}
